package com.lmind.bean;

import java.lang.reflect.InvocationTargetException;
import java.util.Map;
import java.util.Map.Entry;

import org.apache.commons.beanutils.BeanUtils;

public class BeanSetter {

	public void setProperty(Object bean, Map<String, ?> map)
			throws IllegalAccessException, InvocationTargetException {
		for (Entry<String, ?> entry : map.entrySet()) {
			BeanUtils.setProperty(bean, entry.getKey(), entry.getValue());
		}
	}
}
